IF FIRST-OF(tt_so_nbr) THEN DO:
	str = """" + tt_so_nbr + """".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = """" + tt_so_cust + """".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = """" + tt_so_bill + """".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = """" + tt_so_ship + """".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = """" + (if tt_so_ord_date = ? then "" else string(tt_so_ord_date)) + """ """ + (if tt_so_req_date = ? then "" else string(tt_so_req_date)) + """ - """ + (if tt_so_due_date = ? then "" else string(tt_so_due_date)) + """ - """ + (if tt_so_pricing_dt = ? then "" else string(tt_so_pricing_dt)) + """ """ + tt_so_po + """ """ + tt_so_rmks + """ - """ + tt_so_pr_list + """ """ + tt_so_site + """ """ + string(tt_so_channel) + """ - - """ + tt_so_curr + """ - - - - - """ + tt_so_cr_terms + """ - ".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = "- - -".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = "- - - - -".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = "- - - - - - - - - - - " + """Yes""" + " -".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = "- - - -".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = """" + tt_so_cmt_rmks[1] + """ """ + tt_so_cmt_rmks[2] + """ """ + tt_so_cmt_rmks[3] + """ """ + tt_so_cmt_rmks[4] + """ """ + tt_so_cmt_rmks[5] + """ """ + tt_so_cmt_rmks[6] + """ """ + tt_so_cmt_rmks[7] + """ """ + tt_so_cmt_rmks[8] + """ """ + tt_so_cmt_rmks[9] + """ """ + tt_so_cmt_rmks[10] + """ """ + tt_so_cmt_rmks[11] + """ """ + tt_so_cmt_rmks[12] + """ """ + tt_so_cmt_rmks[13] + """ """ + tt_so_cmt_rmks[14] + """ """ + tt_so_cmt_rmks[15] + """".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = """" + (if index(tt_so_cmt_print,"QO") > 0 then "Yes" else "No") + """ """ + (if index(tt_so_cmt_print,"SO") > 0 then "Yes" else "No") + """ """ + (if index(tt_so_cmt_print,"IN") > 0 then "Yes" else "No") + """ """ + (if index(tt_so_cmt_print,"PA") > 0 then "Yes" else "No") + """".
	PUT STREAM bf UNFORMATTED str SKIP.
	PUT STREAM bf UNFORMATTED "." SKIP.
END.
str = """" + string(tt_sod_line) + """".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + tt_sod_part + """".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + tt_sod_site + """".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + string(tt_sod_qty_ord) + """ """ + tt_sod_um + """".
PUT STREAM bf UNFORMATTED str SKIP.
str = "- - -".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + string(round((tt_sod_list_pr * 0.95),2)) + """ -".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + string(round((tt_sod_price * 0.95),2)) + """".
PUT STREAM bf UNFORMATTED str SKIP.
str = "- - - - - - - - - - - - """ + (if tt_sod_req_date = ? then "" else string(tt_sod_req_date)) + """ """ + (if tt_sod_promise_date = ? then "" else string(tt_sod_promise_date)) + """ """ + (if tt_sod_due_date = ? then "" else string(tt_sod_due_date)) + """ """ + (if tt_sod_per_date = ? then "" else string(tt_sod_per_date)) + """ - - - - - - - - - " + """Yes""". 
PUT STREAM bf UNFORMATTED str SKIP.
str = "- - - -".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + tt_sod_cmt_rmks[1] + """ """ + tt_sod_cmt_rmks[2] + """ """ + tt_sod_cmt_rmks[3] + """ """ + tt_sod_cmt_rmks[4] + """ """ + tt_sod_cmt_rmks[5] + """ """ + tt_sod_cmt_rmks[6] + """ """ + tt_sod_cmt_rmks[7] + """ """ + tt_sod_cmt_rmks[8] + """ """ + tt_sod_cmt_rmks[9] + """ """ + tt_sod_cmt_rmks[10] + """ """ + tt_sod_cmt_rmks[11] + """ """ + tt_sod_cmt_rmks[12] + """ """ + tt_sod_cmt_rmks[13] + """ """ + tt_sod_cmt_rmks[14] + """ """ + tt_sod_cmt_rmks[15] + """".
PUT STREAM bf UNFORMATTED str SKIP.
str = """" + (if index(tt_sod_cmt_print,"QO") > 0 then "Yes" else "No") + """ """ + (if index(tt_sod_cmt_print,"SO") > 0 then "Yes" else "No") + """ """ + (if index(tt_sod_cmt_print,"IN") > 0 then "Yes" else "No") + """ """ + (if index(tt_sod_cmt_print,"PA") > 0 then "Yes" else "No") + """".
PUT STREAM bf UNFORMATTED str SKIP.
PUT STREAM bf UNFORMATTED "." SKIP.				
IF LAST-OF(tt_so_nbr) THEN DO:
	PUT STREAM bf UNFORMATTED "." SKIP.
	PUT STREAM bf UNFORMATTED "." SKIP.
	str = "- - - - - - - -".
	PUT STREAM bf UNFORMATTED str SKIP.
	str = "- - - - - - - - - - - - - - """ + tt_so_fob + """ """ + tt_so_shipvia + """ - -".
	PUT STREAM bf UNFORMATTED str SKIP.
END.